﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.views.popups.levelup {
    import reprise.events.*;
    import flash.display.*;
    import flash.utils.*;
    import net.wooga.pets.views.popups.*;
    import net.wooga.pets.utils.*;

    public class ExtraBoostPopupMediator extends AbstractPopupMediator {

        override public function onRegister():void{
            super.onRegister();
            var _local1:Object = this.view.data;
            var _local2:MovieClip = AssetsLibrary.getMovieClip("StarShower");
            RepriseUtils.addClipComponent(this.view, "starShower", _local2);
            addLabel("extraBoostHeader showcardGothicFont", "levelup_increase_maxboost");
            addLabel("extraBoostLabel showcardGothicFont", "global_of", {has:_local1.current_energy, needed:_local1.max_energy});
            var _local3:MovieClip = AssetsLibrary.getMovieClip("StarAnimation");
            RepriseUtils.addClipComponent(this.view, "starCircle", _local3);
            setTimeout(this.handleTimeout, 3000);
        }
        private function get view():ExtraBoostPopupView{
            return ((viewComponent as ExtraBoostPopupView));
        }
        private function handleTimeout():void{
            addViewListener(TransitionEvent.ALL_TRANSITIONS_COMPLETE, this.onTransitionComplete);
            this.view.addCSSClass("moveOut");
        }
        private function onTransitionComplete(_arg1:TransitionEvent):void{
            close();
        }

    }
}//package net.wooga.pets.views.popups.levelup 
